package com.fosu.service;

import com.alibaba.fastjson.JSONObject;
import com.fosu.common.ResponseResult;
import com.fosu.dao.UserDao;
import com.fosu.domain.User;
import com.fosu.vo.Reply;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * @author zqa
 * @version 1.0
 * @date 2020/10/21 9:01
 */
public interface UserService {


    /**查找所有用户
     * @param resp HttpServlet响应对象
     * @return ResponseResult 响应对象
     * @return ResponseResult 响应对象
     */
    public ResponseResult findAll( HttpServletResponse resp);


    /**按用户id查找用户
     * @param userId 用户id
     * @param resp HttpServlet响应对象
     * @return ResponseResult 响应对象
     */
    public ResponseResult findUserById( HttpServletResponse resp,int userId);


    /**修改用户名
     * @param resp  HttpServlet响应对象
     * @param newNickName json:{nickName:"",userId:""}
     * @return ResponseResult 响应对象
     */
    ResponseResult editUserNickName(HttpServletResponse resp,JSONObject newNickName);

    /**修改用户校区
     * @param resp  HttpServlet响应对象
     * @param newCampus 新用户校区 json:{newCampusId:"",userId:""}
     * @return ResponseResult 响应对象
     */
    ResponseResult editUserCampus(HttpServletResponse resp,JSONObject newCampus);

    /**修改用户手机号
     * @param resp  HttpServlet响应对象
     * @param newPhone 新手机号码 json:{phone:"",userId:""}
     * @return ResponseResult 响应对象
     */
    ResponseResult editUserPhone(HttpServletResponse resp,JSONObject newPhone);

    /**修改用户微信号
     * @param resp      HttpServlet响应对象
     * @param newWechat 新微信号
     * @return ResponseResult 响应对象
     */
    ResponseResult editUserWechat(HttpServletResponse resp,JSONObject  newWechat);

    /**获得用户发布的商品个数
     * @param resp   HttpServlet响应对象
     * @param userId 用户id
     * @return ResponseResult 响应对象
     */
    ResponseResult iReleased(HttpServletResponse resp,Integer userId);

    /**获取回复我的具体评论信息
     * @param userId 用户id
     * @return ResponseResult 具体评论信息
     */
    ResponseResult getReplyMe(HttpServletResponse resp, Integer userId);
}
